<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no,email=no,address=no"/>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="../css/zy_common.css"/>
    <link rel="stylesheet" href="../css/zy_base.css"/>
</head>
<body class="bw">
    <div class="flex_a plr24 indexBox">
        <div class="flex1">
            <div class="roundDiv flex_aj flex_column colw">
                <p class="font18" id="incomeTotal"></p>
                <p class="font13 mt20">昨日总收益</p>
            </div>
        </div>
        <div  class="flex1 colw">
            <p class="font18" id="paperTotal"></p>
            <p class="font13 mt20" id="deviceTotal"></p>
            <p class="font13 mt20" id="onlineTotal"></p>
        </div>
    </div>
    <div class="indexList bw plr24 dib clearfix">
        <a href="./zy_expend.html" class="flex_aj flex_column">
            <img src="../img/icon0.png" alt="" >
            <p class="font15 col3 mt20">消耗统计</p>
        </a>
        <a  href="./zy_income.html" class="flex_aj flex_column">
            <img src="../img/icon1.png" alt="" >
            <p class="font15 col3 mt20">收益统计</p>
        </a>
        <a href="./zy_manage.html" class="flex_aj flex_column">
            <img src="../img/icon2.png" alt="" >
            <p class="font15 col3 mt20">设备管理</p>
        </a>
        <a href="./zy_center.html" class="flex_aj flex_column">
            <img src="../img/icon3.png" alt="">
            <p class="font15 col3 mt20">我的账号</p>
        </a>
        <a href="./zy_wallet.html" class="flex_aj flex_column">
            <img src="../img/icon4.png" alt="">
            <p class="font15 col3 mt20">我的钱包</p>
        </a>
    </div>
</body>
</html>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/dlc.js"></script>
<script>
    $(function(){
        dlctipbox.loading('请稍后');
        dlc_request('/api/index/getIndexTotal',{agentId:getLocalData('fd_id')},function (res) {
            dlctipbox.clear();
            console.log(res);
            if(res.code==1){
                $('#incomeTotal').text(res.data.incomeTotal+'元');
                $('#paperTotal').text('昨日总消耗：'+res.data.paperTotal);
                $('#deviceTotal').text('总设备数：'+res.data.deviceTotal+'台');
                $('#onlineTotal').text('在线设备数：'+res.data.onlineTotal+'台');
            }else{
                dlctipbox.alert(res.msg);
            }
        })
    })
</script>